<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			var arr=[[1,2,3],[3,5,6],[7,4,5],[9,5,8]];
			
			//var newArr=arr.map();
			//var res=arr.map(function(currentValue,index,currentArr){
				
				//return 1;
				//return index;
				//return currentValue;
				//var res=arr 经典错误 会出现3个点点
				var res=arr[0].map(function(currentValue,index,currentArr){
				    return arr.map(function(cv,i,ca){
					return cv[index]; //正常显示
					//return i[index]; 全是点点
					//return ca[index];出现重复数字
					//return currentValue;
					//return currentArr;
				});
				
					//document.write(res);
				});
			
			
			
			for (var x of res){
					 document.write(x+"</br>");
			}
			
		</script>
	</body>
</html>
